<?php 
// 获取订单分页
require_once $this->website['path']['action'] . '/zfb/shops/token.php';
$params = $this->params();
$status = $params['status']??-1;
$p = $params['p']??1;
$uid = $params['uid']??1;



$json = array('status'=>'ok','msg'=>'','data'=>'');

$this->website['class']['db']
     ->table('product_order')
     ->page($p)
     ->num($sys['pagingnum'])
     ->order('id desc');


if($status == -1){
  $this->website['class']['db']
  ->where('uid=?',$uid);
}else{
  $this->website['class']['db']
         ->where('uid=? and status=?',$uid,$params['status']);
}

$order = $this->website['class']['db']
         ->paging();



$json['data'] = $order;

         






$this->json_encode_encrypt($json);